import request from '@/utils/request'

export function selectList(params) {
  return request({
    url: '/api/readertopic/list',
    method: 'get',
    params
  })
}
//回显专题内容
export function getTopicById(param) {
  return request({
    url: '/api/readertopic/update_view/'+param,
    method: 'get'
  })
}
//新建专题
export function insertTopic(data) {
  return request({
    url: '/api/readertopic/insert',
    method: 'post',
    data: data
  })
}

//编辑专题
export function updateTopic(data) {
  return request({
    url: '/api/readertopic/update',
    method: 'post',
    data: data
  })
}

//删除专题
export function deleteTopic(data) {
  return request({
    url: '/api/readertopic/delete',
    method: 'post',
    data: data
  })
}
//批量删除专题
export function deleteTopics(data) {
  return request({
    url: '/api/readertopic/deleteIds',
    method: 'post',
    data: data
  })
}

